#pragma once
using namespace std;
#include<iostream>

#include<vector>


namespace xiaolin
{

	template<size_t N>
	class bitset
	{
	public:
		bitset()
		{
			_t.resize(N / 32 + 1);
		}

		void set(size_t N)
		{
			size_t i = N / 32;
			size_t j = N % 32;
			 _t[i] |= (1 << j);
		}

		void reset(size_t N)
		{
			size_t i = N / 32;
			size_t j = N % 32;
			 _t[i] &= ~(1 << j);
		}
		bool test(size_t N)
		{
			size_t i = N / 32;
			size_t j = N % 32;
			 
			return _t[i] & (1 << j);
		}
	private:
		vector<int> _t;
	};
}